

Config = {}


-- print the first 5 bytes of 'init.lua'
local fd = file.open("config.json", "r")
local data = fd:read()
print("config data", data)
local json = {}
if data then
    json = cjson.decode(data)
end
fd:close()

function Config:Get(key)
    return json[key]
end



function Config:Set(k, v)
    json[k] = v
    local fd = file.open("config.json", "w")
    fd:write(cjson.encode(json))
    fd:close()
end